home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / personal / am_30j.zip / DDE.TX_ < prev    next >
Text File  |  1994-02-06  |  18KB  |  235 lines

  1.  
  2. This file contains information about Address Manager and DDE support.
  3.  
  4.  
  5. /****************************************************************************
  6. *                                                                           *
  7. *                Here is the DDE protocol                                   *
  8. *                                                                           *
  9. *                                                                           *
  10. *  Address Manager currently acts only as a SERVER application for DDE      *
  11. *  conversations.  This means *any* application can ask AM for data,        *
  12. *  such as an address or a phone number.                                    *
  13. *                                                                           *
  14. *  The following protocol is used and must be followed by any application   *
  15. *  wishing to get data from AM:                                             *
  16. *                                                                           *
  17. *  1.  Initiate the conversation with AM                                    *
  18. *                                                                           *
  19. *          AppName         Topic                                            *
  20. *          -------         -----                                            *
  21. *          Address         <name of AM data file>  (ie. mynames.add)        *
  22. *                                                                           *
  23. *  2.  Request data from AM                                                 *
  24. *                                                                           *
  25. *          Using W4W macro lang, this can be done using                     *
  26. *          DDERequest() function.  For example, the following               *
  27. *          request could be made:                                           *
  28. *                                                                           *
  29. *                  DDERequest(ChanNum, "a Smith");                          *
  30. *                                                                           *
  31. *          This would request all names from AM that match "Smith"          *
  32. *                                                                           *
  33. *                                                                           *
  34. *          If you are programming in the SDK, the client app would          *
  35. *          post a WM_DDE_REQUEST message to AM with the appropriate         *
  36. *          parameters passed in wParam and lParam.  The HIWORD(lParam)      *
  37. *          in this case would be CF_TEXT.                                   *
  38. *                                                                           *
  39. *                                                                           *
  40. *       The types of data that can be requested are outlined below.  The    *
  41. *       syntax is as follows:                                               *
  42. *                                                                           *
  43. *          <> indicate a required field, and the text between <> will       *
  44. *             describe what goes there.                                     *
  45. *                                                                           *
  46. *          {} indicate an optional field                                    *
  47. *                                                                           *
  48. *          [] indicate a logical entity.  See the protocol for "complete    *
  49. *             control" below to see what I mean.                            *
  50. *                                                                           *
  51. *                                                                           *
  52. * 1===> The protocol for addresses is:                                      *
  53. *                                                                           *
  54. *          a <exact name, as entered in AM, you want an address for>        *
  55. *                                                                           *
  56. *       NOTE:  THIS PROTOCOL IS OUTDATED AND IS SUPERCEDED BY THE           *
  57. *              "Complete Control" PROTOCOL BELOW.  THIS IS PROVIDED         *
  58. *              FOR BACKWARD COMPATIBILITY ONLY.                             *
  59. *                                                                           *
  60. * 2===> The protocol for phone numbers is:                                  *
  61. *                                                                           *
  62. *          p h{wf} <exact name, as entered in AM, you want phone #'s for>   *
  63. *                                                                           *
  64. *       Here, h is for "home" phone, the w for "work" and the f for "fax"   *
  65. *       You may request any or all of the phone numbers for a given person. *
  66. *                                                                           *
  67. *       NOTE:  THIS PROTOCOL IS OUTDATED AND IS SUPERCEDED BY THE           *
  68. *              "Complete Control" PROTOCOL BELOW.  THIS IS PROVIDED         *
  69. *              FOR BACKWARD COMPATIBILITY ONLY.                             *
  70. *                                                                           *
  71. * 3===> The protocol for retrieving the number of names in a specified      *
  72. *       list is:                                                            *
  73. *                                                                           *
  74. *          c [List]                                                         *
  75. *                                                                           *
  76. *       where the call looks like DDERequest(ChanNum, "c [Current List]")   *
  77. *       The [List] field is REQUIRED, but can be set to [Current List] to   *
  78. *       return a count for the current list AM is showing.                  *
  79. *       This does NOT return the total entries in the file, just the        *
  80. *       entries for the specified list.  To get a total count in the file,  *
  81. *       specify [All Addresses] as the List                                 *
  82. *                                                                           *
  83. *                                                                           *
  84. * 4===> The protocol for retreiving the name of the current list being      *
  85. *       shown in Address Manager is:                                        *
  86. *                                                                           *
  87. *                                                                           *
  88. *          l                                                                *
  89. *                                                                           *
  90. *       where the call looks like DDERequest(ChanNum, "l").  So if you are  *
  91. *       currently viewing the "Friends" list in Address Manager, this       *
  92. *       call will return "Friends"                                          *
  93. *                                                                           *
  94. * 4.5=> The protocol for retreiving the number of user defined lists        *
  95. *       associated with the current file is:                                *
  96. *                                                                           *
  97. *                                                                           *
  98. *          gcl                                                              *
  99. *                                                                           *
  100. *       where the call looks like DDERequest(ChanNum, "gcl").  This         *
  101. *       protocol stands for "Get Count Lists"                               *
  102. *                                                                           *
  103. * 4.6=> The protocol for retreiving the name of the first user defined      *
  104. *       list associated with the current file is:                           *
  105. *                                                                           *
  106. *                                                                           *
  107. *          gfl                                                              *
  108. *                                                                           *
  109. *       where the call looks like DDERequest(ChanNum, "gfl").  This         *
  110. *       protocol stands for "Get First List"                                *
  111. *                                                                           *
  112. * 4.7=> The protocol for retreiving the name of the next  user defined      *
  113. *       list associated with the current file is:                           *
  114. *                                                                           *
  115. *                                                                           *
  116. *          gnl                                                              *
  117. *                                                                           *
  118. *       where the call looks like DDERequest(ChanNum, "gnl").  This         *
  119. *       protocol stands for "Get Next List"  Note that you must call        *
  120. *       the "Get First List" protocol *before* calling this protocol;       *
  121. *       otherwise, results are undefined.                                   *
  122. *                                                                           *
  123. * 5===> The "COMPLETE CONTROL" Protocol                                     *
  124. *                                                                           *
  125. *                                                                           *
  126. *       The protocol for complete control of what you want and where you    *
  127. *       want it from is:                                                    *
  128. *                                                                           *
  129. *          uf <[List]> {[Name]} <Format String>                             *
  130. *                                                                           *
  131. *       where:                                                              *
  132. *                                                                           *
  133. *          List is: "All Addresses" or a user defined list.  This field     *
  134. *                   is REQUIRED.  To retreive data from the current list    *
  135. *                   specify [Current List] in this field                    *
  136. *                                                                           *
  137. *          Name is: Exact name, as entered in Address Manager.  This field  *
  138. *                   is OPTIONAL, and if left out will return the first      *
  139. *                   name for the list specified in [List]                   *
  140. *                                                                           *
  141. *          Format String is: Definition of what data to return, for the     *
  142. *                            requested name.  This field is REQUIRED        *
  143. *                                                                           *
  144. *                            The format string can be made up of one or     *
  145. *                            more of the following:                         *
  146. *                                                                           *
  147. *                            String                      Returns            *
  148. *                            ------                      -------            *
  149. *                            %NAME                       Sal. + Full Name   *
  150. *                            %SAL                        Salutation         *
  151. *                            %FN                         First Name         *
  152. *                            %MN                         Middle Name        *
  153. *                            %LN                         Last Name          *
  154. *                            %CO                         Company            *
  155. *                            %A1                         Address Line 1     *
  156. *                            %A2                         Address Line 2     *
  157. *                            %A3                         Address Line 3     *
  158. *                            %CITY                       City               *
  159. *                            %ST                         State              *
  160. *                            %ZIP                        Zip                *
  161. *                            %CNTRY                      Country            *
  162. *                            %HP                         Home Phone         *
  163. *                            %WP                         Work Phone         *
  164. *                            %WE                         Work Extension     *
  165. *                            %FP                         Fax Phone          *
  166. *                            %PP                         Pager Phone        *
  167. *                            %CP                         Cellular Phone     *
  168. *                            %OP                         Other Phone        *
  169. *                            %HISB                       His Birthday       *
  170. *                            %HERB                       Her Birthday       *
  171. *                            %AN                         Anniversary        *
  172. *                            %DEPT                       Departmnet         *
  173. *                            %TITL                       Title              *
  174. *                            %USER1                      User Field 1       *
  175. *                            %USER2                      User Field 2       *
  176. *                            %USER3                      User Field 3       *
  177. *                            %CMT                        Comments           *
  178. *                            %CR                         Inserts New Line   *
  179. *                            %TAB                        Inserts TAB char   *
  180. *                            %<any text up to 50 chars>  Inserts exact text *
  181. *                                                                           *
  182. *          A typical format string might look like this:                    *
  183. *                                                                           *
  184. *                                                                           *
  185. *            %FN% %MN% %LN%CR%A1%CR%A2%CR%A3%CR%CITY% %ST%, %ZIP            *
  186. *                                                                           *
  187. *                                                                           *
  188. *          Example of how to use this protocol:                             *
  189. *                                                                           *
  190. *                                                                           *
  191. *            uf [Friends] %FN% %MN% %LN%CR                                  *
  192. *                                                                           *
  193. *          This example will retrieve information from the first entry in   *
  194. *          the Friends list.  The First Name, Middle Name and Last Name     *
  195. *          followed by a carriage return/line feed will be returned.  Note  *
  196. *          how a space char has been inserted between each names, using     *
  197. *          the "% " format string.                                          *
  198. *                                                                           *
  199. *                                                                           *
  200. *          IMPORTANT INFORMATION                                            *
  201. *          =====================                                            *
  202. *                                                                           *
  203. *          *  The total length of the DDE string sent to Address Manager    *
  204. *             can not exceed 512 bytes.                                     *
  205. *                                                                           *
  206. *          *  The total length of an idividual part of the format string    *
  207. *             can not exceed 50 bytes.  See the last entry in the table     *
  208. *             above to see what I'm talking about.                          *
  209. *                                                                           *
  210. *          *  Note that this protocol will give you either a specific name  *
  211. *             from a specific list, or the first name from a specific list. *
  212. *             Once you have used this protocol, you can use the next        *
  213. *             protocol (described below) to get the next name from the      *
  214. *             same list.                                                    *
  215. *                                                                           *
  216. *                                                                           *
  217. * 6===> The "COMPLETE CONTROL" Protocol's partner                           *
  218. *                                                                           *
  219. *      The protocl to retrieve the next name from a specified list (as      *
  220. *      specified in the previous protocol) is:                              *
  221. *                                                                           *
  222. *          un                                                               *
  223. *                                                                           *
  224. *      This protocol can only be used AFTER a call has been made using the  *
  225. *      previously mentioned protocol.  Essentially, you use the "uf"        *
  226. *      protocol to get the first name, specify the list you want to get     *
  227. *      information from, specify *what* information you want, and then      *
  228. *      you use this protocol to get information for the next name in the    *
  229. *      list.                                                                *
  230. *                                                                           *
  231. *  3.  Terminate the DDE conversation.                                      *
  232. *                                                                           *
  233. *                                                                           *
  234. ****************************************************************************/
  235.